package com.boxman;

import java.awt.Color;
import java.util.ResourceBundle;

// 常量
class Const {
    // 关卡
    public static final String LEVEL_FILE_PATH = "./level/%d.txt";                              // 文件路径
    public static final int LEVEL_COUNT = 15;                                                   // 总数

    // 图片
    public static final String IMAGE_FILE_PATH = "./res/%d.png";                                // 文件路径    

    // 定时器
    public static final int TIMER_INIT = 500;                                                   // 间隔

    // 格
    public static final int GRID_SIZE = 30;                                                     // 尺寸

    // 游戏区域
    public static final int GAME_BOARD_GRID_COUNT_H = 12;                                       // 横向格数
    public static final int GAME_BOARD_GRID_COUNT_V = 12;                                       // 纵向格数
    public static final int GAME_BOARD_WIDTH = GRID_SIZE * GAME_BOARD_GRID_COUNT_H;             // 宽度
    public static final int GAME_BOARD_HEIGHT = GRID_SIZE * GAME_BOARD_GRID_COUNT_V;            // 高度
    public static final Color GAME_BOARD_COLOR = new Color(0, 128, 0);                          // 背景色

    // 状态栏
    public static final int STATUS_BAR_PART_COUNT = 2;                                          // 格数

    // 主窗口
    public static final int WIDTH = 376;                                                        // 宽度
    public static final int HEIGHT = 446;                                                       // 高度
    
    // 字符串
    private static final ResourceBundle RESOURCE = ResourceBundle.getBundle("language_zh_CN");  // 资源

    /**
     * 获取字符串。
     * @param id   字符串 id
     * @return 字符串
     */
    public static String getString(String id) {
        return RESOURCE.getString(id);
    }
}
